import request from '@/utils/request'

// 查询科目列表
export function listFinSubject(query) {
  return request({
    url: '/project/FinSubject/list',
    method: 'get',
    params: query
  })
}

export function listFinSubjectTreeSelect() {
  return request({
    url: '/project/FinSubject/listFinSubjectTreeSelect',
    method: 'get',
  })
}

// 查询科目详细
export function getFinSubject(id) {
  return request({
    url: '/project/FinSubject/' + id,
    method: 'get'
  })
}

// 新增科目
export function addFinSubject(data) {
  return request({
    url: '/project/FinSubject',
    method: 'post',
    data: data
  })
}

export function syncSubjectMonth() {
  return request({
    url: '/project/FinSubject/syncSubjectMonth',
    method: 'post',
  })
}



// 修改科目
export function updateFinSubject(data) {
  return request({
    url: '/project/FinSubject',
    method: 'put',
    data: data
  })
}

// 删除科目
export function delFinSubject(id) {
  return request({
    url: '/project/FinSubject/' + id,
    method: 'delete'
  })
}
